<div class="shop_search_form"></div>

<table class="easyui-datagrid shop_search_result" title="" style="width:100%,height:250px"
       data-options="singleSelect:true,collapsible:true,singleSelect:true">
    <thead>
    <tr>
        <th data-options="field:'ck',checkbox:true"></th>
        <th data-options="field:'account_name',width:220">账号</th>
        <th data-options="field:'_name',width:100">门店名称</th>
        <th data-options="field:'address_string',width:280,align:'right'">地址</th>
    </tr>
    </thead>
</table>


<script type="text/javascript">
    $('.shop_search_form').bigwin('loadView','forms/shop_search_form');

    $('.shop_search_result').datagrid({toolbar: [{
        text:'修改',
        iconCls: 'icon-edit',
        handler: function(){
            var shopId=$('.shop_search_result').datagrid('getSelected')._id;
            $('.content .right').bigwin('loadView','forms/shop_edit_form',function(){
                console.log(shopId);
                $.sget('/api/admin/shops/'+shopId,{},function(data){
                    
                    
                    data=flatObject(data);
                    console.log(data);
                    
                    $('form.shop_edit_from').form('load',data);
                });
                
            });
        }
    },'-']});

</script>